package mortal.game.model
{
	import Message.Public.*;
	import com.gengine.resource.info.*;
	import com.mui.core.*;
	import flash.display.*;
	import mortal.game.resource.*;
	import mortal.game.resource.info.*;
	
	public class PlayerMiniInfo extends Object
	{
		private var _miniPlayer:SPublicMiniPlayer;
		private var _post:String = "";
		private var _extendsObj:Object;
		private var _bitmap:Bitmap;
		
		public function PlayerMiniInfo(param1:SPublicMiniPlayer = null)
		{
			this._extendsObj = new Object();
			this._miniPlayer = param1;
			return;
		}
		
		public function set miniPlayer(param1:SPublicMiniPlayer) : void
		{
			this._miniPlayer = param1;
			return;
		}
		
		public function get entityId() : SEntityId
		{
			return this._miniPlayer.entityId;
		}
		
		public function get sex() : int
		{
			return this._miniPlayer.sex;
		}
		
		public function set sex(param1:int) : void
		{
			this._miniPlayer.sex = param1;
			return;
		}
		
		public function get sexName() : String
		{
			return GameDefConfig.instance.getSex(this.sex).name;
		}
		
		public function get sexImageName() : String
		{
			if (this.sex == ESex._ESexMan)
			{
				return "Chat_Man";
			}
			return "Chat_Woman";
		}
		
		public function get playerName() : String
		{
			return this._miniPlayer.name;
		}
		
		public function set playerName(param1:String) : void
		{
			this._miniPlayer.name = param1;
			return;
		}
		
		public function get playerId() : int
		{
			return this._miniPlayer.entityId.id;
		}
		
		public function get camp() : int
		{
			return this._miniPlayer.camp;
		}
		
		public function set camp(param1:int) : void
		{
			this._miniPlayer.camp = param1;
			return;
		}
		
		public function get level() : int
		{
			return this._miniPlayer.level;
		}
		
		public function set level(param1:int) : void
		{
			this._miniPlayer.level = param1;
			return;
		}
		
		public function get online() : Boolean
		{
			if (this._miniPlayer.online == 0)
			{
				return false;
			}
			return true;
		}
		
		public function set online(param1:Boolean) : void
		{
			this._miniPlayer.online = param1 ? (1) : (0);
			return;
		}
		
		public function get career() : String
		{
			//return CareerConfig.instance.getInfoByCode(this._miniPlayer.career).name;
			return '';
		}
		
		public function get headBitmap() : Bitmap
		{
			if (this._bitmap == null)
			{
				this._bitmap = new Bitmap();
				/*
				AvatarInfo.getAvatar(this._miniPlayer.camp, this._miniPlayer.sex, AvatarType.FRIEND, function (param1:ImageInfo) : void
				{
					_bitmap.bitmapData = param1.bitmapData;
					return;
				}
				);*/
			}
			return this._bitmap;
		}
		
		public function get campShortName() : String
		{
			return GameDefConfig.instance.getCampShort(this._miniPlayer.camp).name;
		}
		
		public function get campName() : String
		{
			return GameDefConfig.instance.getECamp(this._miniPlayer.camp);
		}
		
		public function get isVIP() : Boolean
		{
			return this._miniPlayer.VIP != 0;
		}
		
		public function get intVIP() : int
		{
			return this._miniPlayer.VIP;
		}
		
		public function set intVIP(param1:int) : void
		{
			this._miniPlayer.VIP = param1;
			return;
		}
		
		public function get VIPColor() : ColorInfo
		{
			if (!this.isVIP)
			{
				return null;
			}
			return ColorConfig.instance.getVIPColor(this._miniPlayer.VIP);
		}
		
		public function get vipBitmap() : Bitmap
		{
			if (this.vipBitmapName)
			{
				return GlobalClass.getBitmap(this.vipBitmapName);
			}
			return null;
		}
		
		public function get vipBitmapName() : String
		{
			var _loc_1:String = "";
			switch(this._miniPlayer.VIP)
			{
				case EVIPType._EVIPTypeWeek:
				{
					_loc_1 = "CVip1";
					break;
				}
				case EVIPType._EVIPTypeMonth:
				{
					_loc_1 = "CVip2";
					break;
				}
				case EVIPType._EVIPTypeHalfYear:
				{
					_loc_1 = "CVip3";
					break;
				}
				default:
				{
					break;
				}
			}
			return _loc_1;
		}
		
		public function get miniPlayer() : SPublicMiniPlayer
		{
			return this._miniPlayer;
		}
		
		public function get extendsObj() : Object
		{
			return this._extendsObj;
		}
		
		public function set extendsObj(param1:Object) : void
		{
			this._extendsObj = param1;
			return;
		}
		
		public function get post() : String
		{
			return this._post;
		}
		
		public function set post(param1:String) : void
		{
			this._post = param1;
			return;
		}
		
	}
}
